package config

import (
	"mall_admin_api/biz/factory"
)

type Config struct {
	Mysql  Mysql  `yaml:"mysql"`
	Redis  Redis  `yaml:"redis"`
	Upload Upload `yaml:"upload"`
	Token  Token  `yaml:"token"`
	Env    string `yaml:"env"`
}

type Token struct {
	Expire int64 `yaml:"expire"`
}
type Mysql struct {
	Switch   bool   `yaml:"switch"`
	Host     string `yaml:"host"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	Port     string `yaml:"port"`
	DBName   string `yaml:"db_name"`
}

type Redis struct {
	Switch bool   `yaml:"switch"`
	Host   string `yaml:"host"`
	Port   int    `yaml:"port"`
	Auth   string `yaml:"auth"`
}

type Upload struct {
	Source factory.UploadFactoryType `yaml:"source"`
	Host   string                    `yaml:"host"`
}
